#ifndef _SCRIPTSTATE_H_
#define _SCRIPTSTATE_H_

#include <string>
#include <sol/sol.hpp>


namespace SEngine
{
    class Actor;
    class ScriptState
    {
    public:
        ScriptState(const std::string & fileName);
        virtual ~ScriptState() = default;

        void Attach(Actor & actor);
        void BeforeUpdate();
        void OnUpdate(int delta);
        void AfterUpdate();

    private:
        std::unique_ptr<sol::state> m_luaState;
    };
} // namespace SEngine


#endif